<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Auth_OpenID_FileStore</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Auth_OpenID_FileStore</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This is a filesystem-based store for OpenID associations and</p>
<p class="description"><p>nonces.  This store should be safe for use in concurrent systems on  both windows and unix (excluding NFS filesystems).  There are a  couple race conditions in the system, but those failure cases have  been set up in such a way that the worst-case behavior is someone  having to try to log in a second time.</p><p>Most of the methods of this class are implementation details.  People wishing to just use this store need only pay attention to  the constructor.</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> JanRain, Inc. &lt;<a href="mailto:openid@janrain.com">openid@janrain.com</a>&gt;</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_Auth---OpenID---FileStore.php.html">/Auth/OpenID/FileStore.php</a> (line <span class="field">39</span>)
		</p>
		
				
		<pre><a href="../OpenID/Auth_OpenID_OpenIDStore.html">Auth_OpenID_OpenIDStore</a>
   |
   --Auth_OpenID_FileStore</pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																														
				<div class="method-definition">
											<span class="method-result">Auth_OpenID_FileStore</span>
										<a href="#Auth_OpenID_FileStore" title="details" class="method-name">Auth_OpenID_FileStore</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$directory</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#clean" title="details" class="method-name">clean</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#cleanupAssociations" title="details" class="method-name">cleanupAssociations</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#cleanupNonces" title="details" class="method-name">cleanupNonces</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#destroy" title="details" class="method-name">destroy</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#getAssociation" title="details" class="method-name">getAssociation</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$server_url</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$handle</span> = <span class="var-default">null</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getAssociationFilename" title="details" class="method-name">getAssociationFilename</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$server_url</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$handle</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#removeAssociation" title="details" class="method-name">removeAssociation</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$server_url</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$handle</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#storeAssociation" title="details" class="method-name">storeAssociation</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$server_url</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$association</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#useNonce" title="details" class="method-name">useNonce</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$server_url</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$timestamp</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$salt</span>)
									</div>
											</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodAuth_OpenID_FileStore" id="Auth_OpenID_FileStore"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">Constructor Auth_OpenID_FileStore</span> (line <span class="line-number">49</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Initializes a new <a href="../OpenID/Auth_OpenID_FileStore.html">Auth_OpenID_FileStore</a>.  This  initializes the nonce and association directories, which are  subdirectories of the directory passed in.</p>
	
	<div class="method-signature">
		<span class="method-result">Auth_OpenID_FileStore</span>
		<span class="method-name">
			Auth_OpenID_FileStore
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$directory</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$directory</span><span class="var-description">: This is the directory to put the store  directories in.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodclean" id="clean"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">clean</span> (line <span class="line-number">440</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			clean
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodcleanupAssociations" id="cleanupAssociations"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">cleanupAssociations</span> (line <span class="line-number">604</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			cleanupAssociations
		</span>
				()
			</div>
	
		
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methodcleanupAssociations">Auth_OpenID_OpenIDStore::cleanupAssociations()</a></dt>
					</dl>
			
	</div>
<a name="methodcleanupNonces" id="cleanupNonces"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">cleanupNonces</span> (line <span class="line-number">119</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			cleanupNonces
		</span>
				()
			</div>
	
		
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methodcleanupNonces">Auth_OpenID_OpenIDStore::cleanupNonces()</a></dt>
					</dl>
			
	</div>
<a name="methoddestroy" id="destroy"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">destroy</span> (line <span class="line-number">77</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			destroy
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetAssociation" id="getAssociation"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getAssociation</span> (line <span class="line-number">232</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Retrieve an association. If no handle is specified, return the  association with the most recent issue time.</p>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			getAssociation
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$server_url</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$handle</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$server_url</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$handle</span>			</li>
				</ul>
		
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methodgetAssociation">Auth_OpenID_OpenIDStore::getAssociation()</a></dt>
						<dd>This method returns an Association object from storage that  matches the server URL and, if specified, handle. It returns  null if no such association is found or if the matching  association is expired.</dd>
					</dl>
			
	</div>
<a name="methodgetAssociationFilename" id="getAssociationFilename"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getAssociationFilename</span> (line <span class="line-number">150</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Create a unique filename for a given server url and</p>
<p class="description"><p>handle. This implementation does not assume anything about the  format of the handle. The filename that is returned will  contain the domain name from the server URL for ease of human  inspection of the data directory.</p></p>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getAssociationFilename
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$server_url</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$handle</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$server_url</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$handle</span>			</li>
				</ul>
		
			
	</div>
<a name="methodremoveAssociation" id="removeAssociation"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">removeAssociation</span> (line <span class="line-number">338</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Remove an association if it exists. Do nothing if it does not.</p>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			removeAssociation
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$server_url</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$handle</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$server_url</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$handle</span>			</li>
				</ul>
		
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methodremoveAssociation">Auth_OpenID_OpenIDStore::removeAssociation()</a></dt>
						<dd>This method removes the matching association if it's found, and  returns whether the association was removed or not.</dd>
					</dl>
			
	</div>
<a name="methodstoreAssociation" id="storeAssociation"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">storeAssociation</span> (line <span class="line-number">182</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Store an association in the association directory.</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			storeAssociation
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$server_url</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$association</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$server_url</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$association</span>			</li>
				</ul>
		
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methodstoreAssociation">Auth_OpenID_OpenIDStore::storeAssociation()</a></dt>
						<dd>This method puts an Association object into storage,  retrievable by server URL and handle.</dd>
					</dl>
			
	</div>
<a name="methoduseNonce" id="useNonce"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">useNonce</span> (line <span class="line-number">360</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return whether this nonce is present. As a side effect, mark it  as no longer present.</p>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			useNonce
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$server_url</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$timestamp</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$salt</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$server_url</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$timestamp</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$salt</span>			</li>
				</ul>
		
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methoduseNonce">Auth_OpenID_OpenIDStore::useNonce()</a></dt>
						<dd>Called when using a nonce.</dd>
					</dl>
			
	</div>
							<h4>Inherited Methods</h4>
				<a name='inherited_methods'><!-- --></a>	
									<!-- =========== Summary =========== -->
					<p>Inherited From <span class="classname"><a href="../OpenID/Auth_OpenID_OpenIDStore.html">Auth_OpenID_OpenIDStore</a></span></p>
					<blockquote>
													<span class="method-name"><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methodcleanup">Auth_OpenID_OpenIDStore::cleanup()</a></span><br>
													<span class="method-name"><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methodcleanupAssociations">Auth_OpenID_OpenIDStore::cleanupAssociations()</a></span><br>
													<span class="method-name"><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methodcleanupNonces">Auth_OpenID_OpenIDStore::cleanupNonces()</a></span><br>
													<span class="method-name"><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methodgetAssociation">Auth_OpenID_OpenIDStore::getAssociation()</a></span><br>
													<span class="method-name"><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methodremoveAssociation">Auth_OpenID_OpenIDStore::removeAssociation()</a></span><br>
													<span class="method-name"><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methodreset">Auth_OpenID_OpenIDStore::reset()</a></span><br>
													<span class="method-name"><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methodstoreAssociation">Auth_OpenID_OpenIDStore::storeAssociation()</a></span><br>
													<span class="method-name"><a href="../OpenID/Auth_OpenID_OpenIDStore.html#methoduseNonce">Auth_OpenID_OpenIDStore::useNonce()</a></span><br>
											</blockquote>
										
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Wed, 05 Dec 2007 14:02:12 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
	</p>
	</div></body>
</html>